From: Keir Fraser Date: Fri, 13 Jun 2008 12:48:13 +0000 (+0100) Subject: 32-on-64: Fix is_compat_arg_xlat_range(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14192^2~72 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=a01be666f18b2b2c0f423199db8afc503d52ab78;p=xen.git 32-on-64: Fix is_compat_arg_xlat_range(). Signed-off-by: Keir Fraser --- diff --git a/xen/include/asm-x86/x86_64/uaccess.h b/xen/include/asm-x86/x86_64/uaccess.h index 2450af21e3..2080be86b1 100644 --- a/xen/include/asm-x86/x86_64/uaccess.h +++ b/xen/include/asm-x86/x86_64/uaccess.h @@ -7,7 +7,8 @@ DECLARE_PER_CPU(char, compat_arg_xlat[COMPAT_ARG_XLAT_SIZE]); #define is_compat_arg_xlat_range(addr, size) ({ \ unsigned long __off; \ __off = (unsigned long)(addr) - (unsigned long)COMPAT_ARG_XLAT_VIRT_BASE; \ - (__off | (__off + (unsigned long)(size))) <= PAGE_SIZE; \ + (__off <= COMPAT_ARG_XLAT_SIZE) && \ + ((__off + (unsigned long)(size)) <= COMPAT_ARG_XLAT_SIZE); \ }) /*